<?php


if (POWER != 5) {
  err('该命令必须以基本管理员身份登陆！请重登陆');
}

if ($_POST['act'] == 'del') {
  if (is_array($_POST['id'])) {
    foreach ($_POST['id'] as $id) {
      if (file_exists('writable/__temp__/weather_'.$id.'.txt')) @unlink('writable/__temp__/weather_'.$id.'.txt');
      if (file_exists('writable/__temp__/weather_'.$id.'2.txt')) @unlink('writable/__temp__/weather_'.$id.'2.txt');
    }
  } else {
    err('没有选中项！');
  }
  alert('删除成功！', 'readonly/run/get_manager_access.php');

} elseif ($_POST['act'] == 'set') {
  $text = '<?php
$web[\'weather_step\'] = \''.((isset($_POST['weather_step'])&&is_numeric($_POST['weather_step'])&&$_POST['weather_step']>0)?$_POST['weather_step']:7200).'\';
?>';
  require ('readonly/function/write_file.php');
  write_file('readonly/weather/getweather_step.php', $text);
  alert('设置成功！', '?get=weather');
} else {
  err('命令错误');
}



?>